//
//  HWQQGameListModel.swift
//  HWanGame
//
//  Created by 王昌健 on 2023/6/6.
//  Copyright © 2023 94hwan. All rights reserved.
//

import UIKit
import HandyJSON
class HWQQGameListModel: HandyJSON {
    required init() {}
    
    var id = ""
    var name = ""
    var icon = ""
    var content = ""
    var appid = ""
    var type = ""
    var biaoqian:[String] = []
    var time = ""

}

class HWQQGameHistoryListModel: NSObject, NSCoding {
    
    var id = ""
    var name = ""
    var icon = ""
    var content = ""
    var appid = ""
    var type = ""
    var biaoqian:[String] = []
    var time = ""
    
    override init() {
        super.init()
    }
    
    func encode(with coder: NSCoder) {
        coder.encode(id, forKey: "id")
        coder.encode(name, forKey: "name")
        coder.encode(icon, forKey: "icon")
        coder.encode(content, forKey: "content")
        coder.encode(appid, forKey: "appid")
        coder.encode(type, forKey: "type")
        coder.encode(biaoqian, forKey: "biaoqian")
        coder.encode(time, forKey: "time")
    }
    
    required init?(coder: NSCoder) {
        super.init()
        self.id = coder.decodeObject(forKey: "id") as? String ?? ""
        self.name = coder.decodeObject(forKey: "name") as? String ?? ""
        self.icon = coder.decodeObject(forKey: "icon") as? String ?? ""
        self.content = coder.decodeObject(forKey: "content") as? String ?? ""
        self.appid = coder.decodeObject(forKey: "appid") as? String ?? ""
        self.type = coder.decodeObject(forKey: "type") as? String ?? ""
        self.biaoqian = coder.decodeObject(forKey: "biaoqian") as? Array ?? []
        self.time = coder.decodeObject(forKey: "time") as? String ?? ""
    }
}
